Next | Prev | Up | Top | Contents | Index

Multi-Token Class Match

Some sendmail.cf implementations inadvertently rely on the inability of sendmail to do multi-token class-matching. One such implementation is the standard sendmail.cf file distributed with IRIX Releases 3.2 and 3.3. If your sendmail.cf file is based upon one of those standard sendmail.cf files, you should read this section. If your sendmail.cf file is not based on one of those standard files, this section may serve as an example if you encounter odd behavior with class-matching while running the new sendmail.

The standard IRIX Release 3.2 and 3.3 sendmail.cf files define an S class that is scanned in from the /etc/hosts file. This class is used to detect single-token station names that appear in the local /etc/hosts file. With the advent of multi-token class-matching, the S class no longer operates as intended.

The problem is that station names appearing in the /etc/hosts file are scanned into the S class whether they are single- or multi-token station names (that is, whether or not they contain dots). The S class still worked as intended with previous versions of sendmail, because if an attempt was made to match a multi-token station name in the class, the match would always fail. With the new sendmail, that same match will (incorrectly) succeed. This problem is observed when rules such as this one began matching qualified station names such as foo.bar.sgi.com:

# Assume that unqualified names are local.
R$*<@$=S>$* $1<@$2.$D>$3
The result was that stations such as foo.bar.sgi.com that appeared on the LHS of the rewrite rule shown here were being rewritten to foo.bar.sgi.com.bar.sgi.com, which is obviously wrong.

The problem was not the use of the S class, but rather the practice of scanning multi-token station names from the /etc/hosts file into the class in the first place.

An examination of the sendmail.cf file shows that the S class is being scanned in by the following scan sets:

# Directly-connected SMTP hosts
FS/etc/hosts %*[.0-99] %[-_.a-zzA-ZZ0-99]
FS/etc/hosts %*[.0-99] %*[-._a-zzA-ZZ0-99] %[-_.a-zzA-Z0-99]
These scan sets read in the two left-most station names from /etc/hosts regardless of whether they contain dots. To correct the situation, modify the scan sets to read in only the station names from /etc/hosts in their single-token, unqualified form, as follows:

# Directly-connected SMTP hosts
FS/etc/hosts %*[.0-99] %[-_a-zzA-ZZ0-99]
FS/etc/hosts %*[.0-99] %*[-._a-zzA-ZZ0-99] %[-_a-zzA-ZZ0-99]
Note the removal of the dots from the right-most patterns.

Depending on your use of class-matching, this incompatibility may not affect you. If you suspect there might be a problem, you should examine your use of classes and your class definitions. If you are currently using a sendmail.cf file supplied by Silicon Graphics, you should examine the S class scan sets and make the corrections indicated here. If you use the default sendmail.cf as supplied in this release, you should be free from any such problems.


Next | Prev | Up | Top | Contents | Index